//@ts-ignore
import segment from 'segment'
import { Service, Inject } from 'typedi'

@Service()
export class Segment {
    seg: segment;
    constructor() {
        this.seg = new segment()
        this.seg.useDefault();
    }

    ik(text: string): { w: string, p: number }[] {
        return this.seg.doSegment(text)
    }
}